/*
* Author:  Greg Nowak and Vaibhav Sharma
* Michigan State University
* 
* This is the implementation of the NFC Wireless Sensor Network Application
*/
#include "StorageVolumes.h"
#include "Timer.h"
#include "NFCWireless.h"
// Configuration Information
configuration NFCWirelessAppC
{

}

// Implementation
implementation
{
  	components MainC, NFCWirelessC, LedsC;
  	components new LogStorageC(VOLUME_LOG, TRUE);
  	components new TimerMilliC() as Timer0;
  	components new TimerMilliC() as Timer1;
  	components new TempSensorC() as Sensor;
    
  	NFCWirelessC -> MainC.Boot;
  	NFCWirelessC.Timer0 -> Timer0;
  	NFCWirelessC.Timer1 -> Timer1;
  	NFCWirelessC.Leds -> LedsC; 

	NFCWirelessC.LogRead -> LogStorageC;
	NFCWirelessC.LogWrite -> LogStorageC;
	
	NFCWirelessC.Read -> Sensor;

	components ActiveMessageC;
	NFCWirelessC.RadioControl -> ActiveMessageC;
	
	components DisseminationC;
	NFCWirelessC.DisseminationControl -> DisseminationC;

	components new DisseminatorC(flashLogEntry_t, 0x1234) as Diss16C;
	NFCWirelessC.Value -> Diss16C;
	NFCWirelessC.Update -> Diss16C;
}
